$(function(){
	var wrap = $('.page'), inputFile = $('#file');
	var btn = $('#upload_img'), img1 = $('.yu1'), img2 = $('.yu2');

	btn.on('click', function() {
		img1.animate({opacity:0},300);
		inputFile.click();
	})

	inputFile.on('change', function(e){
		var i = 0;
		for(i; i < e.originalEvent.srcElement.files.length; i++){
			var file = e.originalEvent.srcElement.files[i],
				reader = new FileReader();
				reader.readAsDataURL(file);
			reader.onloadend = function(){
				img1.attr('src', reader.result).animate({opacity: 1}, 700);
				img2.attr('src', reader.result).animate({opacity: 1}, 700);
			}
		}
	})
})